package com.netcracker.training.automonic.dao.roles.oracle;

import java.sql.Date;
import java.util.List;

import org.apache.log4j.Logger;

import com.netcracker.training.automonic.dao.entities.Attribute;
import com.netcracker.training.automonic.dao.entities.AttributeType;
import com.netcracker.training.automonic.dao.entities.Object;
import com.netcracker.training.automonic.dao.entities.Site;
import com.netcracker.training.automonic.dao.entities.Statistics;
import com.netcracker.training.automonic.dao.entities.StatsType;
import com.netcracker.training.automonic.dao.entities.oracle.OracleAttribute;
import com.netcracker.training.automonic.dao.entities.oracle.OracleAttributeType;
import com.netcracker.training.automonic.dao.entities.oracle.OracleObject;
import com.netcracker.training.automonic.dao.entities.oracle.OracleSite;
import com.netcracker.training.automonic.dao.entities.oracle.OracleStatistics;
import com.netcracker.training.automonic.dao.entities.oracle.OracleStatsType;
import com.netcracker.training.automonic.dao.factories.oracle.OracleDAOFactory;
import com.netcracker.training.automonic.dao.roles.ReadDAO;

/**
 * Concrete DAO role for Oracle Database Express Edition 11g Release 2.
 * 
 * @author Vadim Gidulyan
 * 
 * @see ReadDAO
 * @see OracleDAOFactory
 */

public class OracleReadDAO implements ReadDAO
{

	public static final Logger LOGGER = Logger.getLogger(OracleReadDAO.class);
	
	@Override
	public Site selectSiteById(int id)
	{
		return OracleSite.selectSiteById(id);
	}

	@Override
	public Site selectSiteByName(String name)
	{
		return OracleSite.selectSiteByName(name);
	}

	@Override
	public Object selectObjectById(int id)
	{
		return OracleObject.selectObjectById(id);
	}

	@Override
	public Object selectObjectBySiteAndName(Site site, String name)
	{
		return OracleObject.selectObjectBySiteAndName(site, name);
	}

	@Override
	public List<Object> selectObjectsBySite(Site site)
	{
		return OracleObject.selectObjectsBySite(site);
	}

	@Override
	public List<Object> selectObjectsByName(String name)
	{
		return OracleObject.selectObjectsByName(name);
	}

	@Override
	public AttributeType selectAttributeTypeById(int id)
	{
		return OracleAttributeType.selectAttributeTypeById(id);
	}

	@Override
	public AttributeType selectAttributeTypeByCode(String code)
	{
		return OracleAttributeType.selectAttributeTypeByCode(code);
	}

	@Override
	public List<AttributeType> selectAttributeTypesByName(String name)
	{
		return OracleAttributeType.selectAttributeTypesByName(name);
	}

	@Override
	public Attribute selectAttributeById(int id)
	{
		return OracleAttribute.selectAttributeById(id);
	}

	@Override
	public Attribute selectAttributesByObjectAndType(Object object, 
			AttributeType attributeType)
	{
		return OracleAttribute.selectAttributesByObjectAndType(object, 
				attributeType);
	}

	@Override
	public List<Attribute> selectAttributesByObject(Object object)
	{
		return OracleAttribute.selectAttributesByObject(object);
	}

	@Override
	public List<Attribute> selectAttributesByType(AttributeType attributeType)
	{
		return OracleAttribute.selectAttributesByType(attributeType);
	}

	@Override
	public StatsType selectStatsTypeById(int id)
	{
		return OracleStatsType.selectStatsTypeById(id);
	}

	@Override
	public StatsType selectStatsTypeByCode(String code)
	{
		return OracleStatsType.selectStatsTypeByCode(code);
	}

	@Override
	public List<StatsType> selectStatsTypesByName(String name)
	{
		return OracleStatsType.selectStatsTypesByName(name);
	}

	@Override
	public Statistics selectStatistics(Date time, Object object,
			StatsType statsType)
	{
		return OracleStatistics.selectStatistics(time, object, statsType);
	}

	@Override
	public List<Statistics> selectStatisticsByTime(Date time)
	{
		return OracleStatistics.selectStatisticsByTime(time);
	}

	@Override
	public List<Statistics> selectStatisticsByObject(Object object)
	{
		return OracleStatistics.selectStatisticsByObject(object);
	}

	@Override
	public List<Statistics> selectStatisticsByType(StatsType statsType)
	{
		return OracleStatistics.selectStatisticsByType(statsType);
	}

	@Override
	public List<Site> selectAllSites()
	{
		return OracleSite.selectAllSites();
	}

	@Override
	public List<Object> selectAllObjects()
	{
		return OracleObject.selectAllObjects();
	}

	@Override
	public List<AttributeType> selectAllAttributeTypes()
	{
		return OracleAttributeType.selectAllAttributeTypes();
	}

	@Override
	public List<Attribute> selectAllAttributes()
	{
		return OracleAttribute.selectAllAttributes();
	}

	@Override
	public List<StatsType> selectAllStatsTypes()
	{
		return OracleStatsType.selectAllStatsTypes();
	}

	@Override
	public List<Statistics> selectAllStatistics()
	{
		return OracleStatistics.selectAllStatistics();
	}

}
